package com.t2t.top.framework.util;

import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;

/**
 * IO流处理
 *
 * @author yangpengfei
 */
public class ToolsIoUtils extends IOUtils {

    public static String toStringAndClose(InputStream is) throws IOException {
        try {
            return IOUtils.toString(is);
        } finally {
            IOUtils.closeQuietly(is);
        }
    }
}